﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace WAVEZ
{
    class GameOver : SceneBase
    {
        Texture2D gameOver;

        public override void start()
        {
            gameOver = Game1.Self.Content.Load<Texture2D>("game_over");
        }

        public override void update(GameTime gameTime)
        {
            Game1.Self.KeyboardAtual = Keyboard.GetState();

            if (((Game1.Self.KeyboardAtual.IsKeyDown(Keys.Enter)) && Game1.Self.KeyboardAntigo.IsKeyUp(Keys.Enter))) //&& (isGameLevel == true))
            {
                SceneManager.setScene(new Menu(), true);
            }

            Game1.Self.KeyboardAntigo = Game1.Self.KeyboardAtual;

           //if (Keyboard.GetState().IsKeyDown(Keys.B))
           // {
           //     Console.WriteLine(Keyboard.GetState().IsKeyDown(Keys.Enter));
           //     SceneManager.setScene(new Menu(), true);

           // }
        }

        public override void draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Begin();
            spriteBatch.Draw(gameOver, new Vector2(0, 0), Color.White);
            spriteBatch.End();
        }

        public override void terminate()
        {
            
        }
    }
}
